-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add convert_mode param when saving #3172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9e29cef to
36797eb
Compare
|
We don't need to store a map of conversions for each file format. If format supports, for example, only Moreover, we could add more internal modes from time to time without touching any plugins. |
|
Okay, I've added a commit. See what you think |
6e00bc2 to
fba0d01
Compare
fba0d01 to
bcf3ee1
Compare
ca023d2 to
fb9d188
Compare
fb9d188 to
608f73d
Compare
b9e90c7 to
1cd3c57
Compare
|
In general, this is great. The only drawback for me is binding of supported modes for the save function via the parent's module attribute. In particular, this prevents different sets of supported modes in one module. Isn't better to explicitly assign the supported modes to the save function? def _save(im, fp, filename):
pass
_save._supported_modes = ['RGB', 'RGBA', 'P', 'I', 'LA', 'L', '1'] |
462e5de to
55650a3
Compare
5fc6cdb to
ccdc9cd
Compare
4e642b4 to
5b4e8d1
Compare
6b0eda4 to
689fbb4
Compare
Resolves #2663